import { Group, Object3D, Texture } from "three";

export class ResourceSystem {
  /**url -> Object3D */
  public gltfCacheMap: Map<string, Group> = new Map();

  public textureCacheMap: Map<string, Texture> = new Map();
  constructor() {}

  public loadGltf(url: string): Promise<Object3D> {
    return new Promise((resolve, reject) => {

      if (this.gltfCacheMap.has(url)) {
        resolve((this.gltfCacheMap.get(url) as Group).clone());
      }



    })
  }


}
